<!DOCTYPE html>
<html>
<head>
<title>video</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="video-js.7.15.4.css" rel="stylesheet" />
<script src="video.min-7.15.4.js"></script>
<script src="videojs-http-streaming.min.js"></script>
<!-- <script src="https://code.jquery.com/jquery-1.12.4.js"></script> -->
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
</head>
<script>

    base_url = "http://192.168.101.18:20000";
    var path;

    window.onload = function(){
        var url = location.search
        var theRequest = new Object()
        if(url.indexOf("?") != -1){
            var str = url.substr(1)
            var strs = str.split("&")
            for(var i = 0;i<strs.length;i++){
                theRequest[strs[i].split("=")[0]]=(strs[i].split("=")[1])
            }
            // console.log("参数：",theRequest)
            path = theRequest.path
            console.log("参数：",base_url+"/hls"+path)
        }

        var player = videojs('vid1',{
        // src:base_url+"/hls"+path
        sources:[{
            src: base_url+"/hls"+path,
            type:"application/x-mpegURL"
        }]
    });
    }

</script>
<body>

<p>这里是上限</p>
<p>这里是上限</p>
<p>这里是上限</p>
<video-js id="vid1" width="600" height="300" class="vjs-default-skin" controls>
    <source
       src=""
       type="application/x-mpegURL">
  </video-js>

</body>

/html>
